<template>
	<view>
		
		<view class="search_flex">
			<view class="search">
				<image class="ico" src="../../static/ico_ss.png" mode="widthFix"></image>
				<input class="input" placeholder-class="placeholder" v-model="keyword" type="text" placeholder="搜索学员名字/手机号" />
			</view>
		</view>
		
		<view class="screen_flex">
			<view class="screen_name">
				已上传<text class="org">4</text>
			</view>
			<view class="screen_name">
				未上传<text class="org">2</text>
			</view>
			<view class="btn_screen" @click="openScreen">
				<image class="ico" src="../../static/ico_s1.png" mode="widthFix"></image>
				<view class="text">筛选</view>
			</view>
		</view>
		
		<view class="student_list">
			<view class="item">
				<image class="ph" src="../../static/ico_head.png" mode="aspectFill"></image>
				<view class="name">
					施涵涵
				</view>
				<view class="tag tag_green">
					已上传
				</view>
				<view class="btn" @click="gotoAppraise(0)">
					<text class="org">写评价</text>
					<uv-icon name="arrow-right" color="#FF8535" size="24rpx"></uv-icon>
				</view>
			</view>
			<view class="item">
				<image class="ph" src="../../static/ico_head.png" mode="aspectFill"></image>
				<view class="name">
					施涵涵
				</view>
				<view class="tag tag_green">
					已上传
				</view>
				<view class="btn" @click="gotoAppraise(1)">
					<text class="org">查看</text>
					<uv-icon name="arrow-right" color="#FF8535" size="24rpx"></uv-icon>
				</view>
			</view>
			<view class="item">
				<image class="ph" src="../../static/ico_head.png" mode="aspectFill"></image>
				<view class="name">
					施涵涵
				</view>
				<view class="tag tag_org">
					未完成
				</view>
				<view class="btn"></view>
			</view>
		</view>
		
		<uv-popup ref="popup" mode="right" :safeAreaInsetBottom="true" @change="changeScreen">
			<view class="screen_popup">
				<view class="title">
					筛选
				</view>
				<view class="screen_list">
					<view class="screen_item">
						<view class="name">
							上传
						</view>
						<view class="select">
							<view class="item" v-for="(item,index) in uploadType" :class="uploadIndex == index?'hover':''" :key="index" @click="clickUploadType(index)">
								{{item}}
							</view>
						</view>
					</view>
					<view class="screen_item">
						<view class="name">
							评价
						</view>
						<view class="select">
							<view class="item" v-for="(item,index) in discussType" :class="discussIndex == index?'hover':''" :key="index" @click="clickDiscussType(index)">
								{{item}}
							</view>
						</view>
					</view>
				</view>
				<view class="screen_btn">
					<view class="btn_white" @click="clickReset">
						重置
					</view>
					<view class="btn_org" @click="this.$refs.popup.close()">
						确定
					</view>
				</view>
			</view>
		</uv-popup>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keyword: '',
				uploadType: ['已上传','未上传'],
				discussType: ['已评价','未评价'],
				uploadIndex: -1,
				discussIndex: -1
			}
		},
		onLoad() {
			
		},
		methods: {
			gotoAppraise(type){
				uni.navigateTo({
					//url: '/pages/appraise/appraise?workType=1'
					url: `/pages/appraise/appraise?worktype=${type}`
				});
			},
			clickReset(){
				this.uploadIndex = -1
				this.discussIndex = -1
			},
			clickUploadType(index){
				this.uploadIndex = index
			},
			clickDiscussType(index){
				this.discussIndex = index
			},
			gotoInfo(){
				uni.navigateTo({
					url: '/pages/studentInfo/studentInfo'
				});
			},
			openScreen(){
				this.$refs.popup.open();
			},
			changeScreen(e){
				console.log('弹窗状态改变：',e);
			}
		}
	}
</script>

<style lang="scss" scoped>
.org{
	color: #FF8535;
}
.screen_popup{
	position: relative;
	width: 650rpx;
	height: 100%;
	background: #F7F8FA;
	.title{
		text-align: center;
		background: #fff;
		font-size: 30rpx;
		color: #3D3D3D;
		line-height: 40rpx;
		padding:20rpx;
	}
	.screen_list{
		background: #fff;
		padding:0 0 0;
	}
	.screen_item2{
		padding:40rpx 36rpx;
		border-bottom:1px solid rgba(230, 229, 231, 0.8);
		display: flex;
		align-items: center;
		justify-content: space-between;
		.picker{
			display: flex;
			align-items: center;
			color: #BEBEBE;
			font-size: 30rpx;
			line-height: 42rpx;
			text{
				padding-right: 8rpx;
			}
		}
	}
	.screen_item{
		padding:40rpx 36rpx;
		border-bottom:1px solid rgba(230, 229, 231, 0.8);
		.select{
			display: flex;
			align-items: center;
			flex-wrap: wrap;
			.item{
				width: 170rpx;
				height: 56rpx;
				line-height: 56rpx;
				background: #F7F8FA;
				text-align: center;
				font-size: 24rpx;
				margin-top: 20rpx;
				color: rgba(61, 61, 61, 0.8);
				border-radius: 7rpx;
				margin-right: 20rpx;
				&.hover{
					color:#fff;
					background: #FF8535;
				}
			}
		}
		.name{
			flex-shrink: 0;
			font-size: 30rpx;
			color: #3D3D3D;
			line-height: 42rpx;
		}
		.picker{
			display: flex;
			align-items: center;
			color: #BEBEBE;
			font-size: 30rpx;
			line-height: 42rpx;
			text{
				padding-right: 8rpx;
			}
		}
	}
	.screen_btn{
		position: absolute;
		left:0;
		right: 0;
		bottom: 0;
		padding:15rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		.btn_white{
			width: 300rpx;
			height: 84rpx;
			line-height: 84rpx;
			text-align: center;
			background: #FFFFFF;
			box-sizing: border-box;
			border: 2rpx solid #FF8535;
			font-size: 28rpx;
			color: #FF8535;
		}
		.btn_org{
			width: 300rpx;
			height: 84rpx;
			line-height: 84rpx;
			text-align: center;
			background: #FF8535;
			color:#fff;
			font-size: 28rpx;
		}
	}
}
.student_list{
	.item{
		width: 100%;
		height: 160rpx;
		box-sizing: border-box;
		border-bottom:1px solid rgba(230, 229, 231, 0.8);
		padding:0 40rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		background: #fff;
		.ph{
			display: block;
			flex-shrink: 0;
			width: 100rpx;
			height: 100rpx;
			border-radius: 50%;
			margin-right: 25rpx;
			font-size: 0;
		}
		.name{
			flex-shrink: 0;
			font-size: 32rpx;
			font-weight: 500;
			line-height: 38rpx;
		}
		.tag{
			flex-shrink: 0;
			padding:0 10rpx;
			line-height: 36rpx;
			font-size: 22rpx;
			margin-left: 20rpx;
			border-radius: 4rpx;
			&.tag_green{
				color: rgba(0, 181, 120, 1);
				border: 2rpx solid #00B578;
			}
			&.tag_org{
				color: rgba(255, 133, 53, 1);
				border: 2rpx solid #FF8535;
			}
		}
		.btn{
			flex-shrink: 0;
			margin-left: auto;
			display: flex;
			align-items: center;
			text{
				padding-right: 6rpx;
				font-size: 28rpx;
				font-weight: 500;
				line-height: 30rpx;
			}
		}
	}
}
.search_flex{
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding:20rpx 40rpx 0;
	background: #fff;
	.search{
		width: 100%;
		height: 80rpx;
		background: #F7F7F9;
		display: flex;
		align-items: center;
		border-radius: 16rpx;
		padding:0 20rpx;
		.ico{
			flex-shrink: 0;
			width: 40rpx;
			height: 40rpx;
			margin-right: 15rpx;
			opacity: 0.8;
		}
		.input{
			display: block;
			width: 100%;
			background: none;
			border:none;
			font-size: 28rpx;
			color: #333;
			height: 40rpx;
			line-height: 40rpx;
		}
		.placeholder{
			color: #BEBEBE;
		}
	}
	
}
.screen_flex{
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 40rpx;
	border-bottom:1px solid rgba(230, 229, 231, 0.8);
	background: #fff;
	height: 100rpx;
	.screen_name{
		font-size: 28rpx;
		font-weight: 500;
		line-height: 38rpx;
		padding-right: 30rpx;
		text{
			padding-left:5rpx;
		}
	}
	.btn_screen{
		flex-shrink: 0;
		display: flex;
		align-items: center;
		padding:0 8rpx;
		margin-left: auto;
		.ico{
			flex-shrink: 0;
			width: 30rpx;
			height: 32rpx;
			margin-right: 10rpx;
		}
		.text{
			color: #3D3D3D;
			font-size: 28rpx;
			
		}
	}
}

</style>
